<div id="feature_product-container" class="row box-product-row box ">
	<div id="feature_product-paging"></div>
	<h2>Featured Product </h2>
	<div id="feature_product">
		
        <?php $currency = $this->currency->getCurrency();?>
		<?php foreach ($featured_product as $key => $val) { ?>

		<?php 
		$product_id = $val->product_id;
		//$price = number_format($val->price,2,',','.'); 
		$price = $this->currency->format($val->price, $currency);

		$product_name_length = strlen($val->product_name);
		$product_name_limit = $val->product_name;

		if ($product_name_length > 38){
			$product_name_limit = substr($val->product_name, 0, 38) . '..';
		}
		
		?>

			<div class="span2 box-product">
			<a href="<?php echo site_url('product/detail/'.$val->product_seo_name); ?>" title="<?php echo $val->product_name; ?>  <?php echo $price; ?>">
				<span class="product_image">
                <?php if($val->image_file == NULL) {?>
                	<img style="padding:10px;" src="<?php echo base_url('assets/img/no-image-100x100.png') ?>" title="No Image"/>
                <?php }else{ ?>
					<img src="<?php echo base_url('data/thumb/'.$val->image_file) ?>" title="<?php echo $val->product_name ?>  <?php echo $price ?>" alt="<?php echo $val->product_name; ?>  <?php echo $price; ?>">
                <?php } ?>
				</span>
			</a>
			<p class="title">
				<a href="<?php echo site_url('product/detail/'.$val->product_seo_name); ?>" 
					title="<?php echo $val->product_name; ?>  <?php echo $price; ?>"> <?php echo $product_name_limit; ?></a>
			</p>
			<p class="price"> <?php echo $price; ?></p>
			<a class="add_cart" data-product="<?php echo $product_id; ?>">Add to Cart</a>
			<!--<p class="shop"><a href="toko-apel.html" title="tokoapel">tokoapel</a></p>-->
			</div>	

		<?php } ?>				    		    	    		    		    			    				    				    				    					
					    		    	        
	</div>
</div>